<template>
  <div>
    <van-nav-bar
      title="刷脸"
      left-text="返回"
      left-arrow
      @click-left="onClickLeft"
    >
      <template #right>
        <van-icon name="ellipsis" />
      </template>
    </van-nav-bar>
    <van-cell center title="刷脸登陆">
      <template #right-icon>
        <van-switch v-model="checked" size="20" />
      </template>
    </van-cell>
    <van-cell center title="刷脸取款">
      <template #right-icon>
        <van-switch v-model="checked" size="20" />
      </template>
    </van-cell>
    <van-cell center title="刷脸转账">
      <template #right-icon>
        <van-switch v-model="checked" size="20" />
      </template>
    </van-cell>
    <van-cell center title="刷脸支付">
      <template #right-icon>
        <van-switch v-model="checked" size="20" />
      </template>
    </van-cell>
    <van-cell center title="刷脸实名认证">
      <template #right-icon>
        <van-switch v-model="checked" size="20" />
      </template>
    </van-cell>
    <van-cell center title="优先刷脸">
      <template #right-icon>
        <van-switch v-model="checked" size="20" />
      </template>
    </van-cell>
    <van-cell title="更新脸部信息" is-link />
    <van-cell title="刷脸验证授权协议" is-link />
    <van-button type="success" text="温馨提示" @click="showNotify" />
    <van-notify v-model="show" type="success">
      <van-icon name="bell" style="margin-right: 4px" />
      <span>爱老虎油</span>
    </van-notify>
  </div>
</template>

<script>
import { Toast } from "vant";

export default {
  data() {
    return {
      checked: true,
      show: false,
    };
  },
  methods: {
    onInput(checked) {
      Dialog.confirm({
        title: "提醒",
        message: "是否切换开关？",
      }).then(() => {
        this.checked = checked;
      });
    },
    showNotify() {
      this.show = true;
      setTimeout(() => {
        this.show = false;
      }, 2000);
    },
    onClickLeft() {
      Toast(this.$router.go(-1));
    },
  },
};
</script>

<style>
</style>